-- GENERATED SPELL FOR [Masud] --


function spell0_31192(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15496,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31192', 646, 1)
end

function spell1_31192(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(41057,pUnit)
pUnit:RegisterEvent('Sorts_31192', 607, 1)
end

function spell2_31192(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(41056,pUnit)
pUnit:RegisterEvent('Sorts_31192', 2000, 1)
end

function Sorts_31192(pUnit, Event)
local choix_sorts_31192 = math.random(0, 2)
if choix_sorts_31192 == 0 then
pUnit:RegisterEvent('spell0_31192', 1, 1)
end
if choix_sorts_31192 == 1 then
pUnit:RegisterEvent('spell1_31192', 1, 1)
end
if choix_sorts_31192 == 2 then
pUnit:RegisterEvent('spell2_31192', 1, 1)
end
end

function mob31192_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31192', math.random(1500, 3000), 1)
end

function mob31192_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31192_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31192_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31192, 1, 'mob31192_Action')
RegisterUnitEvent(31192, 2, 'mob31192_Leave')
RegisterUnitEvent(31192, 3, 'mob31192_Kill')
RegisterUnitEvent(31192, 4, 'mob31192_Die')
